<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8"> 
<title>苏宁易购：个人中心-修改</title>
<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<link rel="shortcut icon" href="http://localhost/project/shop/Static/Index/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="http://localhost/project/shop/Static/Index/Css/global.css" />

<script type="text/javascript" src="http://localhost/project/shop/Static/Index/Js/jquery.min.js"></script>
<script type="text/javascript" src="http://localhost/project/shop/Static/Index/Js/common.js"></script> 

<script type="text/javascript" src="http://localhost/project/shop/Static/Index/Js/scrolltopcontrol.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="http://localhost/project/shop/Static/Index/Js/DD_belatedPNG.js"></script>
<script>
    DD_belatedPNG.fix(".img_logo", "img");
</script>
<![endif]-->
</head>
<body>
	<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--S header-->
	<div class="header">
		<div class="top_c">
			<div class="top_c_r">
				<ul class="top_list">

					    <?php if(!isset($_SESSION['uname'])){ ?>
					<li class="li_bg">
						<a href="<?php echo U('Member/login');?>" class="a_login">登录</a>
						<a href="<?php echo U('Member/register');?>" class="a_reg">注册</a>
					</li>
					<?php }else{ ?>
					<li class="li_bg">
						<a href="<?php echo U('Member/member');?>" class="a_login"><?php echo $_SESSION['uname'];?></a>
						<a href="<?php echo U('Member/out');?>" class="a_reg">退出</a>
					</li>
					<?php } ?>
					 

					<li>  
						<a href="<?php echo U('Order/index');?>" class="a_show">我的订单</a> 
						<div class="in_hide">
							<a href="javascript:void(0)" class="a_hide">待支付</a>
							<a href="javascript:void(0)" class="a_hide">待收货</a>
							<a href="javascript:void(0)" class="a_hide">待评价</a>
							<a href="javascript:void(0)" class="a_hide">修改订单</a>  
						</div>

					</li>
					<li class="li_buy"><a href="<?php echo U('Cart/index');?>">购物车</a><span>    <?php if($_SESSION['cart']['goods']){ ?><?php echo $_SESSION['cart']['total_rows'];?><?php }else{ ?>0<?php } ?></span></li>
				</ul>
			</div>
		</div> 
	</div> 
	<!-- logo、搜索框等 -->
	<div class="logo_c">
		<a href="http://localhost/project/shop" class="logo"></a>
		<!-- <a class="logo1"></a>  -->
		<div class="search_box">
				<form id="searchForm" method="get" action="" name="searchForm"> 
					<input id="search_input" class="ui_input" type="text" value="服饰5折起" name="keyword"> 
					<input id="search_button" type="submit" value="">

					<div id="KeywordNew" class="g-search-hotwords">
						<input id="searchDefaultKeyword" type="hidden" key="" value="">
							<a href="http://localhost/project/shop/index.php/Index/List/index/cid/13" target="_blank" name="">
							<font style="color:#FF6600">衬衫</font>
						</a>
						<a href="http://localhost/project/shop/index.php/Index/List/index/cid/14" target="_blank" name="">连衣裙</a> 
						<a href="http://localhost/project/shop/index.php/Index/List/index/cid/15" target="_blank" name="">针织衫</a>
						<a href="http://localhost/project/shop/index.php/Index/List/index/cid/16" target="_blank" name="">T恤</a>
						<a href="http://localhost/project/shop/index.php/Index/List/index/cid/17" target="_blank" name="">风衣</a>    
					</div>

				</form>
			</div>
		<div class="r_box"></div>

	</div>
	<!--S nav -->
	<div class="nav">
		<div class="nav_c">
			<dl class="c_dl">
				<dd>
					<a href="javascript:void(0)" class="a_dd_show">全部商品分类</a> 
					<div class="a_dd_box">

						<ul class="list_s">
							<li class="in_li"> 
								<div class="in_div1"><i id="i_bg0"></i><a href="javascript:void(0)">名品</a></div>
								<div class="in_div2"><a href="javascript:void(0)">今日上新</a></div> 
								
								<div class="li_in_hide">
									<p class="p_r_top"><a href="javascript:void(0)">名品特卖更多&gt</a></p>
									<div class="in_pp">
										<?php foreach ($b_data as $k=>$v){?>
											<a href="javascript:void(0)"><img src="http://localhost/project/shop/<?php echo $v['logo'];?>" alt=""></a>
										<?php }?>
									</div> 
								</div>
							</li>
						</ul>


						<?php foreach ($c_data as $k=>$v){?>
							<ul class="list_s">
								<li class="in_li"> 
									<div class="in_div1"><i id="i_bg<?php echo $v['cid'];?>"></i><a href="<?php echo U('List/index',array('cid'=>$v[cid]));?>"><?php echo $v['cname'];?></a></div>

									<?php foreach ($v['cate_s'] as $key=>$value){?>
										<div class="in_div2"><a href="<?php echo U('List/index',array('cid'=>$value[cid]));?>"><?php echo $value['cname'];?></a></div>
									<?php }?>

									<div class="li_in_hide"> 
										<?php foreach ($v['son'] as $k_s=>$v_s){?>
											<a href="<?php echo U('List/index',array('cid'=>$v_s[cid]));?>" class="in_a_title"><?php echo $v_s['cname'];?></a>
											<div class="in_a_box">
													<?php foreach ($v_s['son'] as $key=>$value){?>
														<a href="<?php echo U('List/index',array('cid'=>$value[cid]));?>"><?php echo $value['cname'];?></a> 
													<?php }?>
												</div> 
										<?php }?> 
									</div>
								</li>
							</ul>
						<?php }?> 


					</div> 
				</dd> 
				<dt><a href="http://localhost/project/shop" class="a_s">首页</a></dt>
				<?php foreach ($top_c_data as $key=>$value){?>
					<dt><a href="<?php echo U('List/index',array('cid'=>$value[cid]));?>" class="a_s"><?php echo $value['cname'];?></a></dt>
				<?php }?> 
				<!-- <span class="span_new"></span> -->
				<!-- <span class="span_hot"></span> --> 
			</dl>
		</div>
	</div>   
	<!-- =========头部结束====================================== -->
<link rel="stylesheet" href="http://localhost/project/shop/Static/Index/Css/list.css" />
<link rel="stylesheet" href="http://localhost/project/shop/Static/Index/Css/hdjs.css" /> 
<link rel="stylesheet" href="http://localhost/project/shop/Static/Index/Css/member.css" /> 
<script type="text/javascript" src="http://localhost/project/shop/Static/Index/Js/hdjs.min.js"></script>

<!--上传插件uploadify的文件--> 
        <script type="text/javascript" src="http://localhost/project/shop/Static/uploadify/jquery.uploadify.min.js"></script>
        <link href="http://localhost/project/shop/Static/uploadify/uploadify.css" type="text/css" rel="stylesheet"></link>

        <script type="text/javascript">
            //让上传按钮显示
            function uploadifyShow(){
                     $('#file').uploadify({
                    'formData'     : {//POST数据
                        '<?php echo session_name();?>' : '<?php echo session_id();?>',
                    },
                    'fileTypeDesc' : '上传文件',//上传描述
                    'fileTypeExts' : '*.jpg;*.png',
                    'swf'      : 'http://localhost/project/shop/Static/uploadify/uploadify.swf',
                    'uploader' : '<?php echo U("upload");?>',
                    'buttonText':'选择文件',
                    'fileSizeLimit' : '2000KB',
                    'uploadLimit' : 1,//上传文件数
                    'width':65,
                    'height':25,
                    'multi': false,//是否多文件上传
                    'successTimeout':10,//等待服务器响应时间
                    'removeTimeout' : 0.2,//成功显示时间
                    'onUploadSuccess' : function(file, data, response) {
                        //把变量转为json
                        data=$.parseJSON(data);
                        var li="<li path='"+data.path+"' url='"+data.url+"'><img src='"+data.url+"' style='width:90px;' class='img-thumbnail'/><a href='javascript:;' class='del-img'>X</a><input type='hidden' name='face' value='"+data.path+"' /></li>";
                        $("#uploadList ul").prepend(li);
                        //让删除按钮消失
                        $('.uplodify-box').html('');
                    }
                });
            }
            $(function(){
                    //刷新页面让上传插件显示
                    uploadifyShow();
                    //点击x，隐藏图片，并且上传按钮显示
                $('.del-img').live('click',function(){
                    //获得当前图片的所在的li，让其消失
                    $(this).parent('li').hide();
                    //上传按钮显示
                    $('.uplodify-box').html('<input id="file" type="file" multiple="false"><span>类型: *.jpg,*.png 大小: 2000KB 数量: 10</span>');
                    uploadifyShow();
                    
                })
            });
        </script>


        <style type="text/css">
        #uploadList{
            width: 600px; 
        }
        #uploadList li{
            width: 90px; 
            margin-right: 10px;
            list-style: none;
            position: relative;
        } 
        #uploadList li img{
            width: 90px;  
        }  
        #uploadList li a{
            display: block;
            position: absolute;
            top:0px;
            right:0px; 
            width: 20px;
            height: 20px; 
            color: #f90;
        }  

        </style>

　<div class="position"><a href="http://localhost/project/shop">首页</a>&gt<a href="<?php echo U('Member/member');?>">个人中心</a>&gt修改资料</div> 

<div class="list_main"> 
	<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--左侧-->
<div class="list_main_l">　
<div class="subNavBox subNavBox2">　
	<div class="subNav currentDd currentDt">订单中心</div>
		<ul class="navContent" style="display:block">
			<li><a href="<?php echo U('member_order');?>">我的订单</a></li>
		</ul>
	<div class="subNav currentDd currentDt">账户管理</div>	
		<ul class="navContent" style="display:block">
			<li><a href="<?php echo U('member_address');?>">收货地址</a></li>
			<li><a href="<?php echo U('member_edit',array('uid'=>session('uid')));?>">我的资料</a></li>
		</ul> 
	<div class="subNav currentDd currentDt">客户服务</div>	
		<ul class="navContent" style="display:block;border-bottom:1px solid #fff;">
			<li><a href="<?php echo U('member_comment');?>">我要评价</a></li>
		</ul> 
</div> 
</div>
	<!--右侧-->
	<div class="list_main_r">　 
			<div class="mber_r">
				<div class="me_data">
					
<!--表单验证Start-->
<script>
    $(function () {
        $('#HDJS').validate({ 
        	nickname: {
                rule: {
                    required: true
                },
                error: {
                    required: '昵称不能为空'
                },
                success: '验证通过',
                message: '请输入昵称'
            },  

            username: {
                rule: {
                    required: true
                },
                error: {
                    required: '用户名不能为空'
                },
                success: '验证通过',
                message: '请输入用户名'
            },
            
             
            
            sex: {
                rule: {
                    required: true
                },
                error: {
                    required: '请选择性别'
                }
            },
            email: {
                rule: {
                    required: true,
                    email: true
                },
                error: {
                    required: '邮箱不能为空',
                    email: '邮箱不正确'
                },
                success: '输入正确',
                message: '请输入邮箱'
            },
            address: {
                rule: {
                    required: true
                },
                error: {
                    required: '详细地址不能为空'
                },
                success: '验证通过',
                message: '请输入详细地址'
            },


            tel: {
                rule: {
                    tel: true
                },
                error: {
                    tel: '手机号错误'
                }
                
            },
             
        })
    })
</script>
<!--表单验证End-->
<form id="HDJS" action="" method="post">
    <table class="hd-form hd-table hd-table-form">
        <thead>
        <tr>
            <td colspan="2">我的资料</td>
        </tr>
        </thead>
        <tbody>
        	
        <tr>
            <th class="hd-w150">上传头像</th>
            <td> 
			<div class='imgface_box'> 
					<!-- <img src="<?php echo $userInfo['face'];?>" alt="" style="width:90px;" id="preview"/>  -->
            <div lab="uploadFile">
                <!--这个div是放上传按钮的-->
                <div class="uplodify-box">
                    <!--如果没有上传图片，显示上传按钮-->
                        <?php if(!$userInfo['face']){ ?>
                        <input id="file" type="file" multiple="false">
                            <span>类型: *.jpg,*.png 大小: 2000KB 数量: 10</span>
                    <?php } ?>
                </div>
                <div id="uploadList">
                    <ul>
                            <!--如果有图片上传，则显示图片-->
                                <?php if($userInfo['face']){ ?>
                                <li>
                                    <img src="http://localhost/project/shop/<?php echo $userInfo['face'];?>" style="width:90px;"/>
                                    <a href="javascript:;" class="del-img" path="<?php echo $userInfo['face'];?>">X</a>
                                </li>
                            <?php } ?>
                            
                    </ul>
                </div>
            </div> 

			</div> 
		
            </td>
        </tr>
        

        <tr>
            <th class="hd-w150">昵    称</th>
            <td>
                <input name="nickname" value="<?php echo $userInfo['nickname'];?>" type="text">
            </td>
        </tr>
        
        <tr>
            <th class="hd-w150">用户名</th>
            <td>
                <input name="username" value="<?php echo $userInfo['username'];?>" type="text">
            </td>
        </tr>
        
        <!-- <tr>
            <th class="hd-w150">密码</th>
            <td>
                <input name="password_1" type="text">
            </td>
        </tr>
        <tr>
            <th class="hd-w150">确认密码</th>
            <td>
                <input name="password_2" type="text">
            </td>
        </tr> --> 
        
        <tr>
            <th>性别</th>
            <td>
                <label><input name="sex" value="男" type="radio"     <?php if($userInfo['sex']==男){ ?>checked<?php } ?> > 男</label>
                <label><input name="sex" value="女" type="radio"     <?php if($userInfo['sex']==女){ ?>checked<?php } ?> > 女</label> 

                <span id="hd_sex"></span>
            </td>
        </tr>
        <tr>
            <th>邮箱</th>
            <td>
                <input name="mailbox" value="<?php echo $userInfo['mailbox'];?>" type="text">
            </td>
        </tr>
        <tr>
            <th class="hd-w150">详细地址</th>
            <td>
                <input name="address" value="<?php echo $userInfo['address'];?>" type="text">
            </td>
        </tr>
         
        <tr>
            <th>手机号</th>
            <td>
                <input name="tel" value="<?php echo $userInfo['tel'];?>" type="text">
            </td>
        </tr>
         
        <tr>
            <th></th>
            <td>
                <input value="确定" class="hd-btn hd-btn-sm c" type="submit">
            </td>
        </tr>
        
         
        
         
        </tbody>
    </table>
    	
</form>




				</div>
			</div>
			
			
	</div>
	 
	
</div>
<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!--S foot -->
<div class="foot2"> 
	<div class="foot2_c">
		<dl class="dl_f2">
			<dt class="dt_f2_s"><a href="http://www.houdunwang.com/">后盾网</a></dt> 
			<dt class="dt_f2_s"><a href="http://bbs.houdunwang.com/">后盾网论坛</a></dt>
			<dt class="dt_f2_s"><a href="http://www.baidu.com">百度</a></dt>
		</dl>
		<p class="p_w">Copyright © 2015-2015<span>***.com</span><a>易购</a>All Rights Reserved.<a>京ICP备********号</a></p>
		<img src="http://localhost/project/shop/Static/Index/Images/i_bg.jpg" alt="" class="in_img">
	</div>
</div>
</body>
</html>